<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>首页</title>

    <link rel="stylesheet" type="text/css" href="/static/css/index.css">
    <script src="/static/js/jquery-1.11.3.min.js"></script>
    <script type="text/javascript" src="/static/plugins/My97DatePicker/WdatePicker.js"></script>

    <script>
        $(function () {
            initDate();
            $('#btn1').click(function () {
                beginDate = $('#BeginTime').val();
                endDate = $('#EndTime').val();
                alert(beginDate)
                alert(endDate)
                // 这种是GET请求？的形式传参
                //location.href = '/app01/add1?beginDate=' + beginDate + '&endDate=' + endDate;
                // 这种是GET请求restful风格传参
                location.href = '/down_excel1/' + beginDate + '/' + endDate;
            })

            $('#btn2').click(function () {
                beginDate = $('#BeginTime').val();
                endDate = $('#EndTime').val();
                alert(beginDate)
                alert(endDate)
                // 这种是GET请求？的形式传参
                //location.href = '/app01/add1?beginDate=' + beginDate + '&endDate=' + endDate;
                // 这种是GET请求restful风格传参
                location.href = '/down_excel2/' + beginDate + '/' + endDate;
            })
        })

        function initDate() {
            //设置结束日期为当前日期
            var date = new Date();
            var seperator1 = "-";
            var month = date.getMonth() + 1;
            var strDate = date.getDate();
            if (month >= 1 && month <= 9) {
                month = "0" + month;
            }
            if (strDate >= 0 && strDate <= 9) {
                strDate = "0" + strDate;
            }
            var d = date.getFullYear() + seperator1 + month + seperator1 + strDate;
            $("#BeginTime").val(d + ' 00:00:00');
            $("#EndTime").val(d + ' 23:59:59');
        }
    </script>
</head>


<body>
<h3>菜单</h3>

<details open="open">
    <summary>一级菜单</summary>
    <div>
        <details open="open">
            <summary>二级菜单1</summary>
            <div><a href="https://www.baidu.com">三级菜单1</a></div>
            <div><a href="https://www.taobao.com">三级菜单2</a></div>
        </details>
    </div>
    <div>
        <details open="open">
            <summary>二级菜单2</summary>
        </details>
    </div>
    <div>
        <details open="open">
            <summary>二级菜单3</summary>
        </details>
    </div>
    <br>
</details>


<div>
    <div>
        <p>请输入查询日期范围：</p>
        查询开始日期:
        {#<input nClick="WdatePicker({lang:'zh-cn',minDate:'1970-01-01 00:00:00',maxDate:'#F{$dp.$D(\'EndTime\')}',isShowClear:false,readOnly:true, skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm:ss'})" id="BeginTime"> <br>#}
        {#            <input type="text" name="beginDate" id="beginDate" value="{{ beginDate }}" hidden="hidden" onclick="setday(this)" size="12" runat="server">#}
        {#            <img onclick="WdatePicker({el:'beginDate'})" src="/static/plugins/My97DatePicker/skin/datePicker.gif" width="16" height="22" align="absmiddle"><br>#}
        <input class="Wdate" type="text" id="BeginTime"
               onclick="WdatePicker({lang:'zh-cn',minDate:'1970-01-01 00:00:00',maxDate:'#F{$dp.$D(\'EndTime\')}',isShowClear:false,readOnly:true, skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm:ss'})"/><br>
        查询结束日期:
        {#<input onClick="WdatePicker({lang:'zh-cn',minDate:'#F{$dp.$D(\'BeginTime\')}',maxDate:'2100-01-01 23:59:59',isShowClear:false,readOnly:true, skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm:ss'})" id="EndTime" ><br>#}
        {#            <input type="text" name="endDate" id="endDate" value="{{ endDate }}" hidden="hidden" onclick="setday(this)" size="12" runat="server">#}
        {#            <img onclick="WdatePicker({el:'endDate'})" src="/static/plugins/My97DatePicker/skin/datePicker.gif" width="16" height="22" align="absmiddle"><br>#}
        <input class="Wdate" type="text" id="EndTime"
               onclick="WdatePicker({lang:'zh-cn',minDate:'#F{$dp.$D(\'BeginTime\')}',maxDate:'2100-01-01 23:59:59',isShowClear:false,readOnly:true,skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm:ss'})"/><br>
    </div>
    <div style="padding-top: 30px">
        <button id="btn1">下载需求1报表</button>
        <br>
        <button id="btn2">下载需求2报表</button>
        <br>
    </div>
</div>
</body>

</html>